Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <body> <button onclick="enableLoop()" type="button">Enable loop</button> <button onclick="disableLoop()" type="button">Disable loop</button> <button onclick="checkLoop()" type="button">Check loop status</button><br> <video id="myVideo" width="320" height="176" controls> <source src="mov_bbb.mp4" type="video/mp4"> <source src="mov_bbb.ogg" type="video/ogg"> Your browser does not support HTML5 video. </video> <script> var vid = document.getElementById("myVideo"); function enableLoop() { vid.loop = true; vid.load(); } function disableLoop() { vid.loop = false; vid.load(); } function checkLoop() { alert(vid.loop); } </script> <p>Video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">Big Buck Bunny</a>.</p> </body> <!-- Mirrored from www.w3schools.com/tags/tryit.asp?filename=tryhtml5_av_prop_loop by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:09:54 GMT --> </html>
Result:
Try it Yourself - © w3schools.com